<h1>Modificar Datos de Empleado</h1>

<div  class="area">

    <form action="" method="post" accept-charset="utf-8">
        <div class="split">
            <div class="split" style="width:30%; padding-left:15px;">
                <label>Id Empleado</label>
            </div>
            <div class="split" style="width:70%;">
                <input name="idEmpleado" type="text"  readonly value="<?php echo $datos[0][0]['idempleado'] ?>" maxlength="7" size=20 align="left">
            </div></br></br>

            <div class="split" style="width:30%; padding-left:15px;">
                <label>Primer Nombre</label>
            </div>
            <div class="split" style="width:70%;">
                <input type="pnombre" name="pnombre"  value="<?php echo $datos[0][0]['pnombre'] ?>" required="" maxlength="15" size=20 align="left">
            </div></br></br>

            <div class="split" style="width:30%; padding-left:15px;">
                <label>Segundo nombre</label>
            </div>
            <div class="split" style="width:70%;">
                <input type="snombre" name="snombre"  value="<?php echo $datos[0][0]['snombre'] ?>"maxlength="15"  size=20 align="left">
            </div></br></br>

            <div class="split" style="width:30%; padding-left:15px;">
                <label>Primer Apellido</label>
            </div>
            <div class="split" style="width:70%;">
                <input type="papellido" name="papellido" value="<?php echo $datos[0][0]['papellido'] ?>" maxlength="15" required size=20 align="left">
            </div></br></br>

            <div class="split" style="width:30%; padding-left:15px;">
                <label>Segundo Apellido</label>
            </div>
            <div class="split" style="width:70%;">
                <input type="sapellido" name="sapellido" value="<?php echo $datos[0][0]['sapellido'] ?>" size=20 maxlength="15" align="left">
            </div></br></br>
        </div>
        <div class="split">
            <div class="split" style="width:30%; padding-left:15px;">
                <label>DUI</label>
            </div>
            <div class="split" style="width:70%;">
                <input type="dui" name="dui"  size=20 maxlength="9" required value="<?php echo $datos[0][0]['dui'] ?>" align="left">
            </div></br></br>

            <div class="split" style="width:30%; padding-left:15px;">
                <label>Direccion</label>
            </div>
            <div class="split" style="width:70%;">
                <input type="direccion" name="direccion" required value="<?php echo $datos[0][0]['direccionempleado'] ?>" size=45 align="left">
            </div></br></br>

            <div class="split" style="width:30%; padding-left:15px;">
                <label>Telefono Fijo</label>
            </div>
            <div class="split" style="width:70%;">
                <input type="telefonofijo" name="telefonofijo"   required placeholder="Al menos el de un contacto" maxlength="8" value="<?php echo $datos[0][0]['telefonofijo'] ?>" size=25 align="left">
            </div>
            <div class="split" style="width:30%; padding-left:15px;">
                <label>Celular</label>
            </div>
            <div class="split" style="width:70%;">
                <input type="telefonocelular" name="telefonocelular"maxlength="8"  required placeholder="Al menos el de un contacto" value="<?php echo $datos[0][0]['telefonocelular'] ?>" size=25 align="left">
            </div>

            <div class="split" style="width:40%; padding-left:15px;">
                <label>Tipo de Rol</label>
            </div>

            <div class="split" style="width:40%;">
                <select name="rol" size="1">
                    <?php
                       foreach($roles as $rol):
                    if($datos[0][0]['idrol'] != $rol[0]['idrol']){
                    ?>
                    <option value="<?php echo $rol[0]['idrol'];?>" ><?php echo $rol[0]['nombrerol'];?></option>
                     <?php }else {?>
                    <option value="<?php echo $rol[0]['idrol'];?>" selected><?php echo $rol[0]['nombrerol'];?></option>
                    <?php } endforeach;?>
                </select>

            </div>

            <div class="split" style="width:40%; padding-left:15px;">
                <label>Horas Contratadas</label>
            </div>

            <div class="split" style="width:40%;">
                <select name="horacontratacion" size="1">
                <?php
                       foreach($contrataciones as $con):
                    if($datos[0][0]['idcategoria'] != $con[0]['idcategoria']){
                    ?>
                <option value="<?php echo $con[0]['idcategoria'];?>" ><?php echo $con[0]['nombre'];?></option>
                <?php }else {?>
                <option value="<?php echo $con[0]['idcategoria'];?>" selected><?php echo $con[0]['nombre'];?></option>
                <?php } endforeach;?>
                </select>
            </div>


            <div class="split" style="width:40%; padding-left:15px;">
                <label>Categoria Profesor</label>
            </div>

            <div class="split" style="width:40%;">
                <select name="categoriaProfesor" size="1">
                    <?php if($datos[0][0]['categoriaprofesor'] == 'PU1'){?> <option value="PU1" selected >PU1</option>
                    <?php } else {?> <option value="PU1" >PU1</option> <?php }?>
                    <?php if($datos[0][0]['categoriaprofesor'] == 'PU2'){?> <option value="PU2" selected >PU2</option>
                    <?php } else {?> <option value="PU2" >PU2</option> <?php }?> 
                    <?php if($datos[0][0]['categoriaprofesor'] == 'PU3'){?> <option value="PU3" selected >PU3</option>
                    <?php } else {?> <option value="PU3" >PU3</option> <?php }?> 
                </select>
            </div>

            <div class="split" style="width:30%; padding-left:15px;">
                <label hidden>Estado del empleado</label>
            </div>
            <div class="split" style="width:70%;">
               <input type="estado" name="estado"  hidden readonly size=20 value="<?php echo $datos[0][0]['estadoempleado'] ?>" maxlength="1" align="left">
            </div>

        </div>


        <div style="display:table;">
            <div style="display:table-row;">
                <input class="boton" type="submit" name="Modificar" value="Modificar">
            </div>
        </div>
    </form>

</div>

